package actions;

import BO.memberBO.MemberBO;
import BO.memberBO.MemberBOImpl;

import com.opensymphony.xwork2.ActionSupport;

import entities.Members;

public class MemAction extends ActionSupport {
	// properties of entity
	private int memberId;
	private String account;
	private String password;
	private String email;
	private int roleId;

	// class
	MemberBO memberBO;
	Members m;

	public String login() throws Exception {
		memberBO = new MemberBOImpl();
		m = memberBO.login(account, password);
		if (null == m) {
			return "success";
		} else {
			return "fail";
		}
	}
	
	public String registry() throws Exception {
		return "success";
	}

	public int getMemberId() {
		return memberId;
	}

	public void setMemberId(int memberId) {
		this.memberId = memberId;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public int getRoleId() {
		return roleId;
	}

	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}
}
